% Training the sorting network

function [net] = hw8Train()

% Defining constants
MUTATION_RATE = .001; % m
CROSSOVER_FRAC = .6; % r
numHypo = 200; % p
dataMin = -100;
dataMax = 100;
numInputData = 100;
elementSize = 8;    
numGens = 100;

%genrating random input
inputData = int16((dataMax-dataMin)*rand(numInputData, elementSize)+dataMin);


%finding the fittest hypothesis
net = hw8GA(inputData, numHypo, CROSSOVER_FRAC, MUTATION_RATE,numGens);
save('hw8Intermediate', 'net');

